#ifndef H_A2GR
#define H_A2GR

#include "a2grdef.h"
/*------------------------*/
/*         Colors         */
/*------------------------*/
#define A2G_BLACK     0
#define A2G_BLUE      1
#define A2G_GREEN     2
#define A2G_CYAN      3
#define A2G_RED       4
#define A2G_MAGENTA   5
#define A2G_BROWN     6
#define A2G_GREY      7
#define A2G_DKGREY    8
#define A2G_LTBLUE    9
#define A2G_LTGREEN   10
#define A2G_LTCYAN    11
#define A2G_LTRED     12
#define A2G_LTMAGENTA 13
#define A2G_YELLOW    14
#define A2G_WHITE     15
#define A2G_TRANSP   (-1)
#define A2G_INVERT   (-2)
#define A2G_MOV    0x0000
#define A2G_AND    0x0800
#define A2G_OR     0x1000
#define A2G_XOR    0x1800

#if defined(__FOR_DOS__) || defined(__FOR_DPMI16__)

#ifdef __cplusplus
extern "C" {
#endif

void a2gInit    (int nrow, int ncol, int ch, int cw);

void a2gFillBox (int x,int y, int nx,int ny, int color);

void a2gBorder  (int x,int y, int nx,int ny, int width, int color);

int  a2gSetFont (int nHeight, int nWidth, char far *FontBuf);

void A2GvmPut  (int adrs,int adrm, int wm,int ws, int nx,int ny);
void A2GvmGet  (int adrs,int adrm, int wm,int ws, int nx,int ny);
void A2GmmPut  (int adrs,void *Bf, int wm,int ws, int nx,int ny);
void A2GmmGet  (int adrs,void *Bf, int wm,int ws, int nx,int ny);

int a2gSetGrW (GrW *gw);

int a2gSavGrW (void);

int a2gRstGrW (void);

int a2gFreGrW (GrW *gw);

int a2gIniGrW (GrW *gw,
   int X,int Y, int nCol,int nRow, int cH,int cW, int iFgr,int iBgr);

int a2gWrtGrW (char *s, int col,int row, int len, int step);

void a2gCursor(int Show, int col,int row, int begl,int endl);

void A2GLine (int x1,int y1, int x2,int y2, int color);

#ifdef __cplusplus
}
#endif

#endif /* DOS, DPMI16 */

#endif /* H_A2GR   */
